9d67df67f33fb8f293fa52641d3f6114b9a936c8,sonar-db/src/main/java/org/sonar/db/metric/MetricDao.java,MetricDao,selectNullableById,#DbSession#number#,146

Before Change


  }

  public MetricDto selectNullableById(DbSession session, long id) {
    return mapper(session).selectById(id);
  }

  public MetricDto selectById(DbSession session, int id) {

After Change


  }

  public MetricDto selectOrFailById(DbSession session, int id) {
    MetricDto metric = mapper(session).selectById(id);
    if (metric == null) {
      throw new IllegalStateException(String.format("Metric id '%d' not found", id));
    }
    return metric;